//
//  NetMrg.h
//  优学荟管理系统
//
//  Created by 星道 on 17/6/26.
//  Copyright © 2017年 星道三好. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface NetMrg : NSObject

/**
 实现网络请求Get
 */
+ (NSURLSessionDataTask *)Get:(NSString *)UrlStr Auth:(BOOL)Auth Params:(NSDictionary *)Params Success:(void (^)(id))Success Fail:(void (^)(NSError *))Fail;


/**
 实现网络请求Post
 */
+ (NSURLSessionDataTask *)Post:(NSString *)UrlStr Auth:(BOOL)Auth Params:(NSDictionary *)Params Success:(void (^)(id))Success Fail:(void (^)(NSError *))Fail;


/** 下载 */
+ (NSURLSessionDownloadTask *)Down:(NSString *)UrlStr Auth:(BOOL)Auth Params:(NSDictionary *)Params completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler;


/**
 图片上传

 @param url 图片上传地址
 @param image 要上传的图片
 @param paraDic 其他参数
 @param success 成功回调
 @param fail 失败回调
 */
+ (void)UpdataImgWithURL:(NSString *)url pic:(UIImage *)image parameter:(NSDictionary *)paraDic success:(void (^)(id obj))success fail:(void (^)(NSError *error))fail;

// 多张图片以及其他信息上传
+ (void)UpdataImgsWithURL:(NSString *)url imgs:(NSArray <UIImage *>*)imgs parameter:(NSDictionary *)paraDic Progress:(void (^)(NSProgress *  uploadProgress))Progress success:(void (^)(id obj))success fail:(void (^)(NSError *error))fail;

/**
 音频上传

 @param url 上传地址
 @param FilePath 音频文件地址
 @param paraDic 其他参数
 @param success 成功回调
 @param fail 失败回调
 */
+ (void)UpdataAudioWithURL:(NSString *)url FilePath:(NSString *)FilePath parameter:(NSDictionary *)paraDic success:(void (^)(id obj))success fail:(void (^)(NSError *error))fail;
@end
